const express = require("express");
//创建路由器对象
const router = new express.Router();
// router后面写接口 get post
router.get("/test",(req,res)=>{
    console.log(req.query);
    res.send("测试get请求");
})
//register
router.post("/register",(req,res)=>{
    console.log(req.body);
    res.send("注册成功！");
})
//login
router.post("/login",(req,res)=>{
    console.log(req.body);
    res.send("登录成功！");
})
//暴露一下
module.exports = router;